import axios, { AxiosInstance } from 'axios';

export const createAxiosInstance: CreateAxiosInstance = ({ baseURL }) => {
  const axiosInstance = axios.create({
    baseURL,
    withCredentials: true,
  });

  return axiosInstance;
};

type CreateAxiosInstance = (args: { baseURL: string }) => AxiosInstance;
